package top.tenebrous.yzl.chat.domain.es;

import cn.easyes.annotation.IndexField;
import cn.easyes.annotation.IndexId;
import cn.easyes.annotation.IndexName;
import cn.easyes.annotation.rely.Analyzer;
import cn.easyes.annotation.rely.FieldType;
import cn.easyes.annotation.rely.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
    * 聊天记录表
 * @author yazhang6
 */
@Data
@IndexName(value = "mem_chat_record")
public class EsMemChatRecord implements Serializable {
    /**
     * 自增id
     */
    @IndexId(type = IdType.UUID)
    private String id;

    /**
     * 会员id
     */
    @ApiModelProperty(value="发送者id")
    private Long fromId;

    /**
     * 朋友id
     */
    @ApiModelProperty(value="接收者id")
    private Long toId;

    /**
     * 群组id
     */
    @ApiModelProperty(value="群组id")
    private Long groupId;

    /**
     * 聊天类型 1-私聊 2-公聊
     */
    @ApiModelProperty(value="聊天类型 1-私聊 2-公聊")
    private Integer chatType;

    /**
     * 是否已读 0-否 1-是
     */
    @ApiModelProperty(value="是否已读 0-否 1-是")
    private Integer enableRead;

    /**
     * 发送时间
     */
    @ApiModelProperty(value="发送时间")
    private Date createDate;

    /**
     * 聊天记录
     */
    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_MAX_WORD)
    @ApiModelProperty(value="聊天记录")
    private String content;

    /**
     * 是否删除 0-否 1-是
     */
    @ApiModelProperty(value="是否删除 0-否 1-是")
    private Integer isDelete;

}